package managepictures;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.Scanner;

/**
 * Created by Administrator on 2016/10/18.
 */
public class Main {
      public static void main(String[] args)
      {
          Manage manage=new Manage();
          try{
              BufferedImage file=ImageIO.read(new File("src/picture.jpg"));     //读取图片

              manage.cut(file);                                                //剪切图片

              System.out.println("请输入所需要的图片的宽度和高度：");
              Scanner input=new Scanner(System.in);
              int DestWidth=input.nextInt();
              int DestHeight=input.nextInt();
              manage.change(file,DestWidth,DestHeight);                        //缩放图片

          }catch(IOException e){
              e.printStackTrace();
          }



      }
}
